package com.tcm.ucenter.domain.enums;

import com.base.core.result.ResponseCodeEnum;

/**
 * 错误码枚举类
 * <p>
 * 登录系统，使用 1-001-005-000 段
 */
public enum BusinessCodeEnum implements ResponseCodeEnum {


    //===============用户信息模块=====================
    USER_ID_NOT_FOUND(1002005006, "用户id不存在"),
    AVATAR_PARAMS_NOT_FOUND(1002005007, "请上传头像"),
    AVATAR_UPDATE_FAIL(1002005008, "头像更换失败"),
    INSERT_FAIL(1002005009, "新增用户信息失败"),
    FAILED_TO_QUERY_USER(1002005010, "查询用户信息失败"),
    SMS_IDENTIFIER_NOT_EMPTY(1002005014, "请输入手机号码"),
    SMS_CODE_NOT_FOUND(1002005011, "未检测到验证码"),
    SMS_CODE_HAS_ERROR(1002005012, "验证码错误"),
    SMS_PHONE_NOT_SAME(1002005013, "手机号码不正确"),
    USER_PARAMS_NOT_FOUND(1002005027, "参数不存在"),
    UPDATE_FAIL(1002005028, "更新失败"),
    USER_NOT_FOUND(1002005005, "缺少用户信息"),
    TOKEN_FAIL_PARSE(1002005006, "token解析失败"),
    PATIENT_HAS_EXISTS(1002005007, "患者重复添加"),
    PATIENT_NOT_EXISTS(1002005009, "患者信息不存在"),
    AMOUNT_IS_NOT_EMPTY(1002005010, "必须填写充值金额"),
    FAILED_TO_CREATE_ORDER(1002005011, "充值单创建失败"),
    ID_NOT_EXISTS(1002005013, "充值单ID不存在"),
    RECHARGE_ORDER_NOT_EXISTS(1002005014, "充值单不存在"),
    USER_ADDRESS_NOT_EXISTS(1002005015, "地址不存在！"),
    ;


    private final int code;
    private final String message;

    BusinessCodeEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

}
